<div class="panel panel-default" ng-controller="ArrangeShiftCtrl">
    <div class="panel-heading">
        跨城巴士 / 班次档案 / 生成发班计划
        <span style="float: right;margin-top: -7px;height: 0px">
            <button type="submit" class="btn m-b-xs w-xs btn-info" ui-sref="app.bus.shiftTemplate()">返回</button>
        </span>
    </div>
    <toaster-container toaster-options="{'position-class': 'toast-top-right', 'close-button':true}"></toaster-container>
    <div class="row wrapper m-n">
        <form class="bs-example form-horizontal ng-pristine ng-valid">
            <div class="form-group col-md-3">
                <div class="col-md-11">
                    <input type="text" ng-model="queryMap.batchNo" class="form-control" placeholder="批次号">
                </div>
            </div>
            <div class="form-group col-md-3">
                <div class="col-md-11">
                    <input type="text" ng-model="queryMap.shiftNo" class="form-control" placeholder="班次号">
                </div>
            </div>
            <div class="form-group col-md-3">
                <div class="col-md-11">
                    <div class="input-group">
                        <ui-select ng-model="routeList.selected" theme="bootstrap">
                            <ui-select-match placeholder="线路">{{$select.selected.name}}</ui-select-match>
                            <ui-select-choices repeat="route in routeList | propsFilter: {name: $select.search}">
                                <span ng-bind-html=" route.name| highlight: $select.search"></span>
                            </ui-select-choices>
                        </ui-select>
                        <span class="input-group-btn">
                            <button ng-click="routeList.selected = undefined" class="btn btn-default">
                                <span class="glyphicon glyphicon-trash"></span>
                            </button>
                        </span>
                    </div>
                </div>
            </div>
            <div class="form-group col-md-3">
                <div class="col-md-8">
                    <button type="button" class="btn btn-info" ng-click="query()">查询</button>
                </div>
            </div>

            <div class="form-group col-md-3" has-authority="BUS_SHIFT_TEMPLATE_ADD_SHIFT">
                <div class="col-md-5">
                    <button type="button" class="btn btn-info" ng-click="selectAll(false)">清除选择</button>
                </div>
                <div class="col-md-5">
                    <button type="button" class="btn btn-info" ng-click="selectAll(true)">全部选中</button>
                </div>
            </div>
            <div class="form-group col-md-6" has-authority="BUS_SHIFT_TEMPLATE_ADD_SHIFT">
                <div class="col-md-2">
                    <button type="button" class="btn btn-info" ng-click="insert()">确认发班</button>
                </div>
                <div class="col-md-10">
                    <p class="text-danger">说明：单击要发班的班次档案进行选择（支持多选），点击“确认发班”按钮进行发班。</p>
                </div>
            </div>
        </form>
    </div>
    <div class="panel-body m-t-n">
        <div class="table-responsive m-t-n">
            <div ng-grid="gridOptions" ng-style="{'height': ((dataList.length > maxSize ? maxSize : dataList.length) * 30 + 150) + 'px'}" class="b"></div>
        </div>
    </div>
</div>